package com.atguigu.gulimall.order.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ProductItem {
    private Long skuId;
    private String title;
    private Boolean check;
    private String image;
    private List<String> skuAttr;
    private BigDecimal price;
    private Integer count;
    private BigDecimal totalPrice;

    private BigDecimal weight=new BigDecimal("0.98");

    public BigDecimal getTotalPrice() {
        BigDecimal totalCheckPrice = new BigDecimal("0");
        if (check) {
            totalCheckPrice = this.price.multiply(new BigDecimal("" + this.count));
        }
        return totalCheckPrice;
    }
}
